<div id="formsuccess" style="display:none">{if isset($errors.status) && $errors.status == "success"}{$website->getEditUrl($values.iso)}{/if}</div>
<form name="form" method="post" action="?module=backoffice&action=AjaxContext&href={$href}" class="nyroModal">
{t assignTo=title}Add language{/t}
{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalTitle.html" title=$title}
    <div id="modalContent">
    <table class="listTable" style="width: 100%;">
        <tr><td>{t}Original language{/t} :</td><td>{$originalIso.label_en} ({if $originalIso.label_orig != ""}{$originalIso.label_orig} - {/if}{$originalIso.iso_639_1})</td></tr>
        <tr>
            <td>{t}Translation language{/t} :</td>
            <td>
                <select name="form[iso]" id="isoSelect" style="height: 22px;">
                    {foreach from=$isoCode item=iso}
                    <option value="{$iso.iso_639_1}" {if isset($values.iso) && $values.iso == $iso.iso_639_1}selected="selected"{/if}>{$iso.label_en} ({if $iso.label_orig != ""}{$iso.label_orig} - {/if}{$iso.iso_639_1})</option>
                    {/foreach}
                </select>
                {if isset($errors.iso)}{icon name="warning.png"} {$errors.iso}{/if}
            </td>
        </tr>
        <tr><td>{t}URL{/t} : </td><td>http://{$website->getUrl()}/<span id="iso"></span></td></tr>
    </table>
</div>
{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalFooter.html"}
</form>

{literal}
<script type="text/javascript">
    $(document).ready(function()
    {
        $("#iso").text($("#isoSelect").val().toLowerCase());
        
        $("#isoSelect").change(function(){
            $("#iso").text($(this).val().toLowerCase());
        });
    });
</script>
{/literal}